fix(ruby): lock resolved install options#9992
Conversation
Greptile SummaryThis PR fixes the Ruby backend's lock identity to include all inputs that can change the compiled or downloaded artifact: compile mode, installer choice (
Confidence Score: 4/5Safe to merge; the lock identity expansion is correct and well-tested, with one minor duplication that could drift when the precompiled-default TODO is resolved. The logic change is straightforward and backed by six targeted tests. The only concern is that src/plugins/core/ruby.rs — the Important Files Changed
Reviews (7): Last reviewed commit: "fix(ruby): lock resolved install options" | Re-trigger Greptile |
There was a problem hiding this comment.
Code Review
This pull request introduces ToolOptionSource::InstallManifest to track and apply tool options from installation manifests, updating BackendArg and configuration resolution logic accordingly. The Ruby plugin's lockfile options were refactored into ruby_lockfile_options to include a broader set of settings such as compilation flags, installer repositories, and precompiled binary metadata. Feedback suggests simplifying a match block in the Ruby plugin using a more idiomatic if let pattern to improve readability.
This comment was marked as outdated.
This comment was marked as outdated.
556e50e to
7fb77b1
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Rationale
Lock option values are part of the artifact identity. Recording resolved defaults keeps existing lockfiles stable if mise defaults change later, including Ruby's planned move toward precompiled binaries by default.
Classification
Mixed actual lock/install identity and stale-lock invalidation fix.
Actual identity: source-build settings such as installer choice, build repositories, build options, and patch inputs can change the compiled Ruby tree for the same version. Those inputs are not represented by a locked artifact URL.
Stale-lock invalidation: precompiled URL/platform selector settings mostly choose the binary artifact URL/checksum. Once the lock entry is selected, the locked URL identifies the binary, but the selector still belongs in the exact-options key so changing precompiled source or platform settings does not reuse an older lock entry.
Verification
cargo fmt --checkgit diff --checkcargo test ruby_lockfile_options0d98b51f1